Using distinct() and count()